home *** CD-ROM | disk | FTP | other *** search
/ PC Users 1998 June / Cd Pc Users 9.iso / prog / inst / ssaver / blank.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-11-29  |  3.7 KB  |  116 lines

  1. VERSION 2.00
  2. Begin Form BlankForm 
  3.    BackColor       =   &H00000000&
  4.    BorderStyle     =   0  'None
  5.    ClientHeight    =   5820
  6.    ClientLeft      =   1080
  7.    ClientTop       =   1215
  8.    ClientWidth     =   7365
  9.    ControlBox      =   0   'False
  10.    Height          =   6225
  11.    Icon            =   BLANK.FRX:0000
  12.    Left            =   1020
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   388
  15.    ScaleMode       =   3  'Pixel
  16.    ScaleWidth      =   491
  17.    Top             =   870
  18.    Width           =   7485
  19.    Begin Label Label2 
  20.       AutoSize        =   -1  'True
  21.       BackColor       =   &H00000000&
  22.       Caption         =   "This screen saver does not do anything."
  23.       ForeColor       =   &H00FFFFFF&
  24.       Height          =   195
  25.       Left            =   3120
  26.       TabIndex        =   1
  27.       Top             =   3960
  28.       Width           =   3435
  29.    End
  30.    Begin Label Label1 
  31.       AutoSize        =   -1  'True
  32.       BackColor       =   &H00000000&
  33.       Caption         =   "Example screen saver. You an use this example to make your own screen saver :-)"
  34.       FontBold        =   -1  'True
  35.       FontItalic      =   0   'False
  36.       FontName        =   "MS Sans Serif"
  37.       FontSize        =   12
  38.       FontStrikethru  =   0   'False
  39.       FontUnderline   =   0   'False
  40.       ForeColor       =   &H00FFFFFF&
  41.       Height          =   900
  42.       Left            =   2400
  43.       TabIndex        =   0
  44.       Top             =   2640
  45.       Width           =   5055
  46.       WordWrap        =   -1  'True
  47.    End
  48. 'Option Explicit
  49. Dim lastX, lastY            ' Last position of the moues
  50. Dim numLines                ' Number of lines drawn so far
  51. Dim gTop, gLeft, gWidth, gHeight
  52. Dim gGrowing
  53. Dim gFileName(3)
  54. Dim gFileCounter
  55. Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
  56.     EndScrnsave                 ' End screen blanking
  57. End Sub
  58. Sub Form_Load ()
  59.     '--- Center this form
  60.     Move 0, 0, Screen.Width, Screen.Height
  61.     '--- Position the labels
  62.     '--- This centers Label1
  63.     LAbel1.Top = scaleheight / 2
  64.     LAbel1.Left = scalewidth / 2 - LAbel1.Left
  65.     '--- This positions Label2 under label1
  66.     Label2.Top = LAbel1.Height + LAbel1.Top
  67.     '''''''''''''''''''''
  68.     '--- Hide the mouse
  69.     HideMouse
  70. End Sub
  71. Sub Form_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  72.     If IsEmpty(lastX) Or IsEmpty(lastY) Then
  73.     lastX = X
  74.     lastY = Y
  75.     End If
  76.     '
  77.     ' Only unblank the screen if the mouse moves quickly
  78.     ' enough (more than 2 pixels at one time.
  79.     '
  80.     If Abs(lastX - X) > 2 Or Abs(lastY - Y) > 2 Then
  81.     EndScrnsave             ' End screen blanking
  82.     End If
  83.     lastX = X                   ' Remember last position
  84.     lastY = Y
  85. End Sub
  86. Sub IMGmONSTER_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  87.     If IsEmpty(lastX) Or IsEmpty(lastY) Then
  88.     lastX = X
  89.     lastY = Y
  90.     End If
  91.     '
  92.     ' Only unblank the screen if the mouse moves quickly
  93.     ' enough (more than 2 pixels at one time.
  94.     '
  95.     If Abs(lastX - X) > 2 Or Abs(lastY - Y) > 2 Then
  96.     EndScrnsave             ' End screen blanking
  97.     End If
  98.     lastX = X                   ' Remember last position
  99.     lastY = Y
  100. End Sub
  101. Sub IMGmONSTER_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  102.     If IsEmpty(lastX) Or IsEmpty(lastY) Then
  103.     lastX = X
  104.     lastY = Y
  105.     End If
  106.     '
  107.     ' Only unblank the screen if the mouse moves quickly
  108.     ' enough (more than 2 pixels at one time.
  109.     '
  110.     If Abs(lastX - X) > 2 Or Abs(lastY - Y) > 2 Then
  111.     EndScrnsave             ' End screen blanking
  112.     End If
  113.     lastX = X                   ' Remember last position
  114.     lastY = Y
  115. End Sub
  116.